package com.dhcc.bpm.modules.safe.service.impl;
import com.dhcc.bpm.modules.safe.entity.Flow;
import com.dhcc.bpm.modules.safe.vo.FlowVO;
import com.dhcc.bpm.modules.safe.mapper.FlowMapper;
import com.dhcc.bpm.modules.safe.service.IFlowService;
import org.springblade.core.mp.base.BaseServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.core.metadata.IPage;

/**
 * @ClassName OpcFlowServiceImpl
 * @Description 流量管理表 服务实现类
 * @Author daina
 * @Date 2020/2/21 14:16
 * @Version V1.0
 * @Copyright: 2020 东华软件 . All rights reserved.
 */
@Service("opc_flow")
public class OpcFlowServiceImpl extends BaseServiceImpl<FlowMapper, Flow> implements IFlowService {

	@Autowired
	private FlowMapper flowMapper;

	@Override
	public IPage<FlowVO> selectFlowPage(IPage<FlowVO> page, FlowVO flow) {
		return page.setRecords(baseMapper.selectFlowPage(page, flow));
	}
	@Override
	public IPage<FlowVO> pageBybasePrdt(IPage<FlowVO> page, FlowVO flow) {
		return page.setRecords(baseMapper.pageBybasePrdt(page, flow));
	}
	@Override
	public FlowVO selectAppFlowByAppId(String appId,String env) { return flowMapper.selectAppFlowByAppId(appId, env); }

	@Override
	public FlowVO selectAppFlowByAppApi(FlowVO flowVo) {
		return flowMapper.selectAppFlowByAppApi(flowVo);
	}

	@Override
	public int updateRefreshStatus(FlowVO flow) {
		return flowMapper.updateRefreshStatus(flow);
	}

	@Override
	public int refreshStatus(FlowVO flow) {
		return flowMapper.refreshStatus(flow);
	}

	@Override
	public IPage<FlowVO> selectFlowPageByApp(IPage<FlowVO> page, FlowVO flow) {
		return page.setRecords(flowMapper.selectFlowPageByApp(page,flow));
	}
}
